Add support for custom target-specific runners
authorIngvar Stepanyan <me@rreverser.com>
Wed, 26 Apr 2017 00:16:17 +0000 (01:16 +0100)
committerIngvar Stepanyan <me@rreverser.com>
Fri, 12 May 2017 22:14:11 +0000 (23:14 +0100)
commite1a85a607c5599d4116ecd6394a33674875581b9
tree0ad5c5067623a5247be3da306b637f4f23d78eea
parent13d92c64d0153d95dbabeb49b828bbbef4b1bb34
Add support for custom target-specific runners

When `target.$triple.runner` is specified, it will be used for any execution commands by cargo including `cargo run`, `cargo test` and `cargo bench`. The original file is passed to the runner executable as a first argument.

This allows to run tests when cross-comping Rust projects.

This is not a complete solution, and might be extended in future for better ergonomics to support passing extra arguments to the runner itself or overriding runner from command line, but it should already unlock major existing usecases.

Fixes #1411
Resolves #3626
src/cargo/ops/cargo_compile.rs
src/cargo/ops/cargo_rustc/compilation.rs
tests/tool-paths.rs